<template>
  <div>
    <div class="p-2 mb-2">
      <i class="fa fa-bars fa-fw text-primary"></i>
      快捷菜单
    </div>
    <div class="p-2 card">
      <div class="menu-item bg-light p-2" @click="libraryVisible = true">
        <i class="fa fa-folder-o fa-fw text-primary"></i>
        公共项目库
      </div>
      <div class="menu-item bg-light p-2 mt-2" @click="financeVisble = true">
        <i class="fa fa-file-text-o fa-fw text-primary"></i>
        信用查询
      </div>
      <div class="menu-item bg-light p-2 mt-2" @click="viewSign">
        <i class="fa fa-file-pdf-o fa-fw text-primary"></i>
        保函查询
      </div>
      <div class="menu-item bg-light p-2 mt-2" @click="viewNotice">
        <i class="fa fa-file-pdf-o fa-fw text-primary"></i>
        放款通知
      </div>
      <div class="menu-item bg-light p-2 mt-2" @click="productVisible = true">
        <i class="fa fa-address-book-o fa-fw text-primary"></i>
        产品白名单管理
      </div>
      <div class="menu-item bg-light p-2 mt-2" @click="riskWarningVisble = true">
        <i class="fa fa-shield fa-fw text-primary"></i>
        风险预警管理
      </div>
    </div>

    <product-dialog :visible.sync="productVisible"></product-dialog>
    <library-dialog :visible.sync="libraryVisible"></library-dialog>
    <sign-dialog :visible.sync="signVisible" :title="title" :sign-type="signType"></sign-dialog>
    <finance-dialog :visible.sync="financeVisble"></finance-dialog>
    <risk-warning-dialog :visible.sync="riskWarningVisble"></risk-warning-dialog>
  </div>
</template>

<script>
import ProductDialog from '@/bank/views/business/index/ProductDialog'
import LibraryDialog from '@/bank/views/business/index/LibraryDialog'
import SignDialog from '@/bank/views/business/index/SignDialog'
import FinanceDialog from '@/credit/views/county/finance/FinanceDialog.vue'
import RiskWarningDialog from '@/bigbank/views/index/RiskWarningDialog.vue'

export default {
  components: {
    ProductDialog,
    LibraryDialog,
    SignDialog,
    FinanceDialog,
    RiskWarningDialog,
  },
  data() {
    return {
      productVisible: false,
      libraryVisible: false,
      signVisible: false,
      noticeVisible: false,
      financeVisble: false,
      riskWarningVisble: false,
      signType: 0,
      title: '担保意向函',
    }
  },

  created() {},
  methods: {
    handleViewPdf(url) {
      window.open(url)
    },
    viewSign() {
      this.title = '担保意向函'
      this.signType = [1, 2, 3, 4]
      this.signVisible = true
    },
    viewNotice() {
      this.title = '放款通知书'
      this.signType = [5]
      this.signVisible = true
    },
  },
}
</script>
<style lang="scss" scoped>
.menu-item {
  &:hover {
    cursor: pointer;
    color: $primary;
  }
}
</style>
